.class Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;
.super Landroid/os/AsyncTask;
.source "AbstractPostsListActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/opongo/blogapp/activities/AbstractPostsListActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "downloadOldPostsAsyncTask"
.end annotation

.annotation system Ldalvik/annotation/Signature;
    value = {
        "Landroid/os/AsyncTask",
        "<",
        "Ljava/lang/Integer;",
        "Ljava/lang/Void;",
        "Landroid/database/Cursor;",
        ">;"
    }
.end annotation


# instance fields
.field private changeFooterView:Z

.field final synthetic this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;


# direct methods
.method private constructor <init>(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;)V
    .locals 1
    .parameter

    .prologue
    .line 225
    iput-object p1, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    invoke-direct {p0}, Landroid/os/AsyncTask;-><init>()V

    .line 228
    const/4 v0, 0x0

    iput-boolean v0, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->changeFooterView:Z

    return-void
.end method

.method synthetic constructor <init>(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;)V
    .locals 0
    .parameter
    .parameter

    .prologue
    .line 225
    invoke-direct {p0, p1}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;-><init>(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;)V

    return-void
.end method


# virtual methods
.method protected varargs doInBackground([Ljava/lang/Integer;)Landroid/database/Cursor;
    .locals 10
    .parameter "params"

    .prologue
    const/4 v9, 0x2

    const/4 v8, 0x1

    .line 232
    iget-object v0, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iput-boolean v8, v0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->lockLoading:Z

    .line 234
    const/4 v0, 0x0

    aget-object v0, p1, v0

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    if-ne v0, v8, :cond_0

    .line 235
    iput-boolean v8, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->changeFooterView:Z

    .line 237
    :cond_0
    const/16 v3, 0x14

    .line 238
    .local v3, postperpage:I
    aget-object v0, p1, v8

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v2

    .line 241
    .local v2, page:I
    aget-object v0, p1, v9

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    if-ne v0, v8, :cond_1

    .line 242
    mul-int/2addr v3, v2

    .line 243
    const/4 v2, 0x1

    .line 246
    :cond_1
    iget-object v7, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v0, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v0, v0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->apiManager:Lcom/opongo/blogapp/manager/APIManager;

    iget-object v1, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget v1, v1, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->blogType:I

    .line 247
    iget-object v4, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v4, v4, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->searchString:Ljava/lang/String;

    const/4 v5, -0x1

    .line 246
    invoke-virtual/range {v0 .. v5}, Lcom/opongo/blogapp/manager/APIManager;->getPosts(IIILjava/lang/String;I)Ljava/util/ArrayList;

    move-result-object v0

    #setter for: Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->posts:Ljava/util/ArrayList;
    invoke-static {v7, v0}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$0(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;Ljava/util/ArrayList;)V

    .line 249
    iget-object v0, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->posts:Ljava/util/ArrayList;
    invoke-static {v0}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$1(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;)Ljava/util/ArrayList;

    move-result-object v0

    if-eqz v0, :cond_3

    .line 252
    :try_start_0
    iget-object v0, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->posts:Ljava/util/ArrayList;
    invoke-static {v0}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$1(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;)Ljava/util/ArrayList;

    move-result-object v0

    invoke-virtual {v0}, Ljava/util/ArrayList;->iterator()Ljava/util/Iterator;

    move-result-object v0

    :cond_2
    :goto_0
    invoke-interface {v0}, Ljava/util/Iterator;->hasNext()Z
    :try_end_0
    .catch Ljava/lang/Exception; {:try_start_0 .. :try_end_0} :catch_0

    move-result v1

    if-nez v1, :cond_4

    .line 279
    :goto_1
    aget-object v0, p1, v9

    invoke-virtual {v0}, Ljava/lang/Integer;->intValue()I

    move-result v0

    if-ne v0, v8, :cond_8

    .line 280
    iget-object v0, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v0, v0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->dbManager:Lcom/opongo/blogapp/manager/DatabaseManager;

    invoke-virtual {v0}, Lcom/opongo/blogapp/manager/DatabaseManager;->cleanPosts()V

    .line 286
    :cond_3
    :goto_2
    iget-object v0, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v0, v0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->dbManager:Lcom/opongo/blogapp/manager/DatabaseManager;

    new-instance v1, Ljava/lang/StringBuilder;

    iget-object v4, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v4, v4, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->query:Ljava/lang/String;

    invoke-static {v4}, Ljava/lang/String;->valueOf(Ljava/lang/Object;)Ljava/lang/String;

    move-result-object v4

    invoke-direct {v1, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    const-string v4, " LIMIT "

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    iget-object v4, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget v4, v4, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->queryLimit:I

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    invoke-virtual {v0, v1}, Lcom/opongo/blogapp/manager/DatabaseManager;->query(Ljava/lang/String;)Landroid/database/Cursor;

    move-result-object v0

    return-object v0

    .line 252
    :cond_4
    :try_start_1
    invoke-interface {v0}, Ljava/util/Iterator;->next()Ljava/lang/Object;

    move-result-object v6

    check-cast v6, Lcom/opongo/blogapp/common/Post;

    .line 254
    .local v6, post:Lcom/opongo/blogapp/common/Post;
    iget-object v1, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v1, v1, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->dbManager:Lcom/opongo/blogapp/manager/DatabaseManager;

    iget v4, v6, Lcom/opongo/blogapp/common/Post;->id:I

    int-to-long v4, v4

    invoke-virtual {v1, v4, v5}, Lcom/opongo/blogapp/manager/DatabaseManager;->itemExists(J)Z

    move-result v1

    if-eqz v1, :cond_6

    .line 255
    sget-boolean v1, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->DEBUG:Z

    if-eqz v1, :cond_5

    .line 256
    invoke-static {}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$2()Ljava/lang/String;

    move-result-object v1

    .line 257
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "Updating item with id "

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 258
    iget v5, v6, Lcom/opongo/blogapp/common/Post;->id:I

    invoke-static {v5}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    .line 257
    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 256
    invoke-static {v1, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 259
    :cond_5
    iget-object v1, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v1, v1, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->dbManager:Lcom/opongo/blogapp/manager/DatabaseManager;

    invoke-virtual {v1, v6}, Lcom/opongo/blogapp/manager/DatabaseManager;->updatePost(Lcom/opongo/blogapp/common/Post;)I

    .line 269
    :goto_3
    iget-object v1, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget v1, v1, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->post_id:I

    if-eqz v1, :cond_2

    iget-object v1, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget v1, v1, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->post_id:I

    iget v4, v6, Lcom/opongo/blogapp/common/Post;->id:I

    if-ne v1, v4, :cond_2

    .line 270
    iget-object v1, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v4, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->posts:Ljava/util/ArrayList;
    invoke-static {v4}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$1(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;)Ljava/util/ArrayList;

    move-result-object v4

    invoke-virtual {v4, v6}, Ljava/util/ArrayList;->indexOf(Ljava/lang/Object;)I

    move-result v4

    iput v4, v1, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->position:I

    goto/16 :goto_0

    .line 274
    .end local v6           #post:Lcom/opongo/blogapp/common/Post;
    :catch_0
    move-exception v0

    goto/16 :goto_1

    .line 262
    .restart local v6       #post:Lcom/opongo/blogapp/common/Post;
    :cond_6
    sget-boolean v1, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->DEBUG:Z

    if-eqz v1, :cond_7

    .line 263
    invoke-static {}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$2()Ljava/lang/String;

    move-result-object v1

    .line 264
    new-instance v4, Ljava/lang/StringBuilder;

    const-string v5, "Persisting item with id "

    invoke-direct {v4, v5}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    .line 265
    iget v5, v6, Lcom/opongo/blogapp/common/Post;->id:I

    invoke-static {v5}, Ljava/lang/String;->valueOf(I)Ljava/lang/String;

    move-result-object v5

    invoke-virtual {v4, v5}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v4

    .line 264
    invoke-virtual {v4}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v4

    .line 263
    invoke-static {v1, v4}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 266
    :cond_7
    iget-object v1, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v1, v1, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->dbManager:Lcom/opongo/blogapp/manager/DatabaseManager;

    invoke-virtual {v1, v6}, Lcom/opongo/blogapp/manager/DatabaseManager;->insertPost(Lcom/opongo/blogapp/common/Post;)J
    :try_end_1
    .catch Ljava/lang/Exception; {:try_start_1 .. :try_end_1} :catch_0

    goto :goto_3

    .line 282
    .end local v6           #post:Lcom/opongo/blogapp/common/Post;
    :cond_8
    iget-object v0, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v0, v0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->dbManager:Lcom/opongo/blogapp/manager/DatabaseManager;

    new-instance v1, Ljava/lang/StringBuilder;

    const-string v4, "UPDATE "

    invoke-direct {v1, v4}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V

    iget-object v4, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v4, v4, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->dbManager:Lcom/opongo/blogapp/manager/DatabaseManager;

    invoke-virtual {v4}, Lcom/opongo/blogapp/manager/DatabaseManager;->getTableName()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    .line 283
    const-string v4, " SET newpost = 0"

    invoke-virtual {v1, v4}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;

    move-result-object v1

    invoke-virtual {v1}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;

    move-result-object v1

    .line 282
    invoke-virtual {v0, v1}, Lcom/opongo/blogapp/manager/DatabaseManager;->execQuery(Ljava/lang/String;)V

    goto/16 :goto_2
.end method

.method protected bridge varargs synthetic doInBackground([Ljava/lang/Object;)Ljava/lang/Object;
    .locals 1
    .parameter

    .prologue
    .line 1
    check-cast p1, [Ljava/lang/Integer;

    invoke-virtual {p0, p1}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->doInBackground([Ljava/lang/Integer;)Landroid/database/Cursor;

    move-result-object v0

    return-object v0
.end method

.method protected onPostExecute(Landroid/database/Cursor;)V
    .locals 6
    .parameter "c"

    .prologue
    const/4 v5, 0x0

    .line 291
    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iput-boolean v5, v2, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->lockLoading:Z

    .line 293
    new-instance v0, Landroid/content/Intent;

    const-string v2, "com.opongo.progressDialog_hide"

    invoke-direct {v0, v2}, Landroid/content/Intent;-><init>(Ljava/lang/String;)V

    .line 294
    .local v0, i:Landroid/content/Intent;
    const-string v2, "MESSAGE"

    iget-object v3, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    const v4, 0x7f070017

    invoke-virtual {v3, v4}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->getString(I)Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v0, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 295
    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->context:Landroid/content/Context;
    invoke-static {v2}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$3(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;)Landroid/content/Context;

    move-result-object v2

    invoke-virtual {v2, v0}, Landroid/content/Context;->sendBroadcast(Landroid/content/Intent;)V

    .line 297
    sget-boolean v2, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->DEBUG:Z

    if-eqz v2, :cond_0

    .line 298
    invoke-static {}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$2()Ljava/lang/String;

    move-result-object v2

    const-string v3, "onPostExecute"

    invoke-static {v2, v3}, Landroid/util/Log;->d(Ljava/lang/String;Ljava/lang/String;)I

    .line 299
    :cond_0
    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v2, v2, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->mAdapter:Lcom/opongo/blogapp/adapter/PostListAdapter;

    invoke-virtual {v2, p1}, Lcom/opongo/blogapp/adapter/PostListAdapter;->changeCursor(Landroid/database/Cursor;)V

    .line 300
    iget-boolean v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->changeFooterView:Z

    if-eqz v2, :cond_1

    .line 301
    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    invoke-virtual {v2}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->getListView()Landroid/widget/ListView;

    move-result-object v2

    iget-object v3, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->footerViewLoading:Landroid/view/View;
    invoke-static {v3}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$4(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;)Landroid/view/View;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/ListView;->removeFooterView(Landroid/view/View;)Z

    .line 302
    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    invoke-virtual {v2}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->getListView()Landroid/widget/ListView;

    move-result-object v2

    iget-object v3, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->footerView:Landroid/view/View;
    invoke-static {v3}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$5(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;)Landroid/view/View;

    move-result-object v3

    invoke-virtual {v2, v3}, Landroid/widget/ListView;->addFooterView(Landroid/view/View;)V

    .line 303
    iput-boolean v5, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->changeFooterView:Z

    .line 305
    :cond_1
    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v2, v2, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->mAdapter:Lcom/opongo/blogapp/adapter/PostListAdapter;

    invoke-virtual {v2}, Lcom/opongo/blogapp/adapter/PostListAdapter;->notifyDataSetChanged()V

    .line 307
    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget v2, v2, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->post_id:I

    if-eqz v2, :cond_2

    .line 308
    invoke-interface {p1}, Landroid/database/Cursor;->requery()Z

    .line 310
    new-instance v1, Landroid/content/Intent;

    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    #getter for: Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->context:Landroid/content/Context;
    invoke-static {v2}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$3(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;)Landroid/content/Context;

    move-result-object v2

    const-class v3, Lcom/opongo/blogapp/activities/PostViewScrollActivity;

    invoke-direct {v1, v2, v3}, Landroid/content/Intent;-><init>(Landroid/content/Context;Ljava/lang/Class;)V

    .line 311
    .local v1, intent:Landroid/content/Intent;
    const-string v2, "POSITION"

    iget-object v3, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget v3, v3, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->position:I

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;I)Landroid/content/Intent;

    .line 312
    const-string v2, "TABLENAME"

    iget-object v3, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v3, v3, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->dbManager:Lcom/opongo/blogapp/manager/DatabaseManager;

    invoke-virtual {v3}, Lcom/opongo/blogapp/manager/DatabaseManager;->getTableName()Ljava/lang/String;

    move-result-object v3

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 313
    const-string v2, "QUERY"

    iget-object v3, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iget-object v3, v3, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->query:Ljava/lang/String;

    invoke-virtual {v1, v2, v3}, Landroid/content/Intent;->putExtra(Ljava/lang/String;Ljava/lang/String;)Landroid/content/Intent;

    .line 315
    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    invoke-virtual {v2, v1}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->startActivity(Landroid/content/Intent;)V

    .line 317
    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    iput v5, v2, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->post_id:I

    .line 320
    .end local v1           #intent:Landroid/content/Intent;
    :cond_2
    iget-object v2, p0, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->this$0:Lcom/opongo/blogapp/activities/AbstractPostsListActivity;

    const/4 v3, 0x0

    #setter for: Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->downloadOld:Landroid/os/AsyncTask;
    invoke-static {v2, v3}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity;->access$6(Lcom/opongo/blogapp/activities/AbstractPostsListActivity;Landroid/os/AsyncTask;)V

    .line 321
    return-void
.end method

.method protected bridge synthetic onPostExecute(Ljava/lang/Object;)V
    .locals 0
    .parameter

    .prologue
    .line 1
    check-cast p1, Landroid/database/Cursor;

    invoke-virtual {p0, p1}, Lcom/opongo/blogapp/activities/AbstractPostsListActivity$downloadOldPostsAsyncTask;->onPostExecute(Landroid/database/Cursor;)V

    return-void
.end method
